
<!--
 * @Author: ljc
 * @Date: 2023-04-25 15:00:24
 * @LastEditors: g05047
 * @LastEditTime: 2023-05-05 09:58:38
 * @Description: 穿透项目列表
-->

<template>
  <rk-dialog width="1200"
    height="700"
    :title="title"
    :visible="visible"
    :destroyOnClose="true"
    @close="visible = false"
    :maskClosable="false">
    <RkContainer :isFooter="false"
      :isAside="false"
      :isHeader="false">
      <template #main>
        <rk-condition>
          <template #condition>
            <rk-condition-bar v-show="true">
              <template #content>
                <el-form ref="form"
                  :inline="true">
                  <span>任务名称:</span>
                </el-form>
              </template>
              <template #buttons>
              </template>
            </rk-condition-bar>
          </template>
          <template #content>
            <rk-grid ref="taskMangementRef"
              dataUrl="/proResApply/reserveProjectPage"
              boxConfig
              :params="queryParams"
              :columns="tableColumns">
              <template #toolbar_buttons>
                <RkButtonGroup :options="json_proj_button"
                  v-model="queryParams.wfStatus"
                  @click="handleSearch" />
              </template>
              <template #toolbar_tools>
                <el-input v-model="queryParams.mhcx"
                  placeholder="请输入项目名称"
                  class="mr-15px w-200px"
                  clearable
                  @click="handleSearch">
                </el-input>
              </template>
            </rk-grid>
          </template>
        </rk-condition>
      </template>
    </RkContainer>
  </rk-dialog>
</template>
    <script setup>
import { json_proj_button } from '@/common/button-data.js'
import { ref } from 'vue'

const { appContext } = getCurrentInstance();
const globalProxy = appContext.config.globalProperties;
const taskMangementRef = ref('')
const visible = ref(false)
const title = ref('项目列表')
// 查询参数
let queryParams = reactive({
  wfStatus: '001',
  status: undefined,
  mhcx: undefined,
  bondTypeCode: 2,    // 债券类型测试数据 1、一般 2、专项
  nodeId: 'node_1',  //填报测试数据
  processKey: 'PRO_CBK', //测试数据
  adCode: '231025',
  agCode: undefined,
  agId: undefined,
})

const tableColumns = ref([
  {
    field: 'proName', title: '地区名称', width: 250, align: 'left',
  },
  { field: 'fiscalYear1', title: '单位名称', width: 250, align: 'left', },
  { field: 'fiscalYear2', title: '项目编码', width: 250, align: 'left', },
  { field: 'fiscalYear2', title: '项目名称', width: 250, align: 'left', },
  { field: 'fiscalYear3', title: '项目负责人', width: 120, align: 'left', },
  { field: 'remark', title: '备注', width: 120, align: 'left' },
])

/**查询 */
const handleSearch = () => {
  taskMangementRef.value.searchEvent()
}

/** 打开弹出层 */
const handleOpen = (options) => {
  visible.value = true
}
/** 关闭弹窗 */
const hanldeClose = () => {
  visible.value = false
}

/** 确认提交 */
const handleConfirm = () => {
  visible.value = false
}
// 对外暴露方法
defineExpose({
  handleOpen
})

    </script>
    
    <style lang="scss" scoped>
.mr-15px {
  margin-right: 15px;
  &:last-child {
    margin-right: 0;
  }
}
.w-200px {
  width: 200px;
}
</style>
    